<?php


namespace EchoPHP\Http\Exception;

use EchoPHP\Http\Response;
use RuntimeException;

class HttpResponseException extends RuntimeException {

    protected $response;

    /**
     * 创建一个http响应异常
     * HttpResponseException constructor.
     * @param Response $response
     */
    public function __construct(Response $response) {
        $this->response = $response;
    }

    /**
     * 返回响应实例
     * @return Response
     */
    public function getResponse() {
        return $this->response;
    }
}